package org.linlinjava.litemall.admin.service;

import org.linlinjava.litemall.db.domain.SubscribeStatisticsVo;
import org.linlinjava.litemall.db.service.SubscribeStatisticService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 管理订阅服务
 *
 * @author yliyun
 * @date 2022/09/14
 */
@Service
public class AdminSubscribeService {
    /**
     * 订阅数据服务
     */
    @Autowired
    private SubscribeStatisticService subscribeStatisticService;

//    public List<SubscribeStatisticsVo> statistics(String endTime,String startTime,Integer shopId){
//        return subscribeStatisticService.statistics(startTime,endTime,shopId,subscribeId);
//    }

    /**
     * 查询区域
     *
     * @param shopId 商店id
     * @return {@link Integer}
     */
    public Integer queryRegions(Integer shopId){
        return subscribeStatisticService.queryRegions(shopId);
    }

    /**
     * 查询订阅num
     *
     * @param startTime   开始时间
     * @param endTime     结束时间
     * @param shopId      商店id
     * @param subscribeId 订阅id
     * @return {@link Integer}
     */
    public Integer querySubscribeNum(String startTime,String endTime,Integer shopId,Integer subscribeId){
        return
                subscribeStatisticService.querySubscribeNum(startTime,endTime,shopId,subscribeId);
    }

    /**
     * 查询订阅自我num
     *
     * @param startTime   开始时间
     * @param endTime     结束时间
     * @param shopId      商店id
     * @param subscribeId 订阅id
     * @return {@link Integer}
     */
    public Integer querySubscribeSelfNum(String startTime,String endTime,Integer shopId,Integer subscribeId){
        return
                subscribeStatisticService.querySubscribeSelfNum(startTime,endTime,shopId,subscribeId);
    }

    /**
     * 查询存储num订阅
     *
     * @param startTime   开始时间
     * @param endTime     结束时间
     * @param shopId      商店id
     * @param subscribeId 订阅id
     * @return {@link Integer}
     */
    public Integer querySubscribeStoreNum(String startTime,String endTime,Integer shopId,Integer subscribeId){
        return
                subscribeStatisticService.querySubscribeStoreNum(startTime,endTime,shopId,subscribeId);
    }

    /**
     * 查询订阅邮件num
     *
     * @param startTime   开始时间
     * @param endTime     结束时间
     * @param shopId      商店id
     * @param subscribeId 订阅id
     * @return {@link Integer}
     */
    public Integer querySubscribeMailNum(String startTime,String endTime,Integer shopId,Integer subscribeId){
        return
                subscribeStatisticService.querySubscribeMailNum(startTime,endTime,shopId,subscribeId);
    }

    /**
     * 查询用户总数
     *
     * @param startTime   开始时间
     * @param endTime     结束时间
     * @param shopId      商店id
     * @param subscribeId 订阅id
     * @return {@link Integer}
     */
    public Integer queryUserTotal(String startTime,String endTime,Integer shopId,Integer subscribeId){
        return
                subscribeStatisticService.queryUserTotal(startTime,endTime,shopId,subscribeId);
    }

    /**
     * 查询总价格
     *
     * @param startTime   开始时间
     * @param endTime     结束时间
     * @param shopId      商店id
     * @param subscribeId 订阅id
     * @return {@link Integer}
     */
    public Double queryTotalPrice(String startTime,String endTime,Integer shopId,Integer subscribeId){
        return subscribeStatisticService.queryTotalPrice(startTime,endTime,shopId,subscribeId);
    }

    /**
     * 查询总点
     *
     * @param startTime   开始时间
     * @param endTime     结束时间
     * @param shopId      商店id
     * @param subscribeId 订阅id
     * @return {@link Integer}
     */
    public Integer queryTotalPoint(String startTime,String endTime,Integer shopId,Integer subscribeId){
        return
                subscribeStatisticService.queryTotalPoint(startTime,endTime,shopId,subscribeId);
    }

    /**
     * 查询订单num
     *
     * @param startTime   开始时间
     * @param endTime     结束时间
     * @param shopId      商店id
     * @param subscribeId 订阅id
     * @return {@link Integer}
     */
    public Integer queryOrderNum(String startTime,String endTime,Integer shopId,Integer subscribeId){
        return
                subscribeStatisticService.queryOrderNum(startTime,endTime,shopId,subscribeId);
    }

    /**
     * 查询货物num
     *
     * @param startTime   开始时间
     * @param endTime     结束时间
     * @param shopId      商店id
     * @param subscribeId 订阅id
     * @return {@link Integer}
     */
    public Integer queryGoodsNum(String startTime,String endTime,Integer shopId,Integer subscribeId){
        return
                subscribeStatisticService.queryGoodsNum(startTime,endTime,shopId,subscribeId);
    }

    /**
     * 查询商品底价
     *
     * @param startTime   开始时间
     * @param endTime     结束时间
     * @param shopId      商店id
     * @param subscribeId 订阅id
     * @return {@link Integer}
     */
    public Integer queryGoodsBasePrice(String startTime,String endTime,Integer shopId,Integer subscribeId){
        return subscribeStatisticService.queryGoodsBasePrice(startTime,endTime,shopId,subscribeId);
    }

    public Integer querySubscribeBasePrice(){
        return subscribeStatisticService.querySubscribeBasePrice();
    }
}
